import request from '@/utils/request'

//查询所有的排班组和班次
export function listScheduleClass() {
  return request({
    url: '/teacher/schedule/loadAttendanceSchedule',
    method: 'get'
  })
}


// 查询老师排班列表
export function listSchedule(query) {
  return request({
    url: '/teacher/schedule/list',
    method: 'get',
    params: query
  })
}

// 查询老师排班详细
export function getSchedule(id) {
  return request({
    url: '/teacher/schedule/' + id,
    method: 'get'
  })
}

// 新增老师排班
export function addSchedule(data) {
  return request({
    url: '/teacher/schedule',
    method: 'post',
    data: data
  })
}

// 修改老师排班
export function updateSchedule(data) {
  return request({
    url: '/teacher/schedule',
    method: 'put',
    data: data
  })
}

// 删除老师排班
export function delSchedule(id) {
  return request({
    url: '/teacher/schedule/' + id,
    method: 'delete'
  })
}
